package com.llcbenwu.config;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @author lilinchun
 * @date 2021/10/21 0021 16:48
 */
@Data
public class Result<T> implements Serializable {

    private static final long serialVersionUID = -8497670085742879369L;


    @ApiModelProperty(value = "返回码", example = "200")
    private Integer code=200;

    @ApiModelProperty(value = "返回消息", example = "")
    private String message="SUCCESS";

    @ApiModelProperty(value = "返回数据", example = "")
    private T data;

    private Result() {
    }

    public Result(T data) {
        this.data = data;
    }


    public Result(Integer code,String message) {
        this.code=code;
        this.message = message;
    }

}
